<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        setInterval(function () {
            var obj = document.getElementById("iframe");
            obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
        },200)
    </script>
</head>
<body>
<div style="height: 20px;background: red"></div>
<iframe id="iframe" src="demo.html" width="100%" scrolling="no" frameborder="0"></iframe>
<div style="height: 20px;background: blue"></div>
</body>
</html>